<template>
    <el-card shadow="always" :body-style="{ padding: '20px' }">
        <el-tabs v-model="currentTabs">
            <el-tab-pane label="文章列表" name="data">
                <article-data></article-data>
            </el-tab-pane>
            <el-tab-pane label="文章添加" name="add">
                <article-add></article-add>
            </el-tab-pane>
            <el-tab-pane label="文章修改" name="edit" v-if="showEdit">
                <article-edit></article-edit>
            </el-tab-pane>
        </el-tabs>
    </el-card>
    
</template>

<script>
import { mapState } from 'vuex'
import ArticleAddVue from './ArticleAdd.vue'
import ArticleEditVue from './ArticleEdit.vue'
import ArticleTableVue from './ArticleTable.vue'


export default {
    name: "Article",
    data(){
        return {
            
        }
    },
    components: {
        'article-data': ArticleTableVue,
        'article-add': ArticleAddVue,
        'article-edit': ArticleEditVue
    },
    computed: {
        ...mapState('aa', [
            'currentTabs',
            'showEdit',
        ])
    }
}
</script>